< previous page page_49 next page >

Page 49
Shape Control
You can use a shape control to display a rectangle, square, oval, circle, rounded rectangle, or rounded square without needing to draw it yourself during Paint events. You can determine the control's shape by setting its Shape property to one of the following values:
vbShapeRectangle
vbShapeSquare
vbShapeOval
vbShapeCircle
vbShapeRoundedRectangle
vbShapeRoundedSquare
Example program Shapes, shown in Figure 1.29, displays each of these different shapes.
As is the case with the Line control, you can use a Shape control's BorderStyle and BorderWidth properties to determine how the shape's border is displayed. You can also use the control's BorderColor property to specify the color of the shape's border.
Color
Many Visual Basic controls have color properties that determine the control's foreground, background, or fill colors. Color can be one of the most confusing topics in computer graphics. Chapter 3 discusses color in more detail. This section describes only simple color concepts that you can use in much of your Visual Basic programming.
0049-01.jpg
Figure 1.29
Example program Shapes displays
the different shape control types.

 
< previous page page_49 next page >